<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="" id="app">
<div>水果列表</div>
    <ul>
        <li v-for="item in fruits" v-text="item"></li>
        <li v-for="(item, index) in fruits" v-text="item + '---' + index"></li>
        <li :key="index" v-for="(item, index) in myFruits">
            <span v-text="item.ename"></span>
            <span>--------</span>
            <span v-text="item.cname"></span>
        </li>
    </ul>
</div>

<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            fruits: ["apple","orange","banana"],
            myFruits: [{
                ename: "apple",
                cname: "苹果"
            },{
                ename: "orange",
                cname: "橘子"
                },{
                ename: "banana",
                cname: "香蕉"
            }]
        },
        methods: {

        },
    });
</script>
</body>
</html>